package com.ruoyi.iot.service.task;

import cn.hutool.core.date.DateUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.ruoyi.iot.service.IFacDevicesDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SensorDataJob implements TaskJob{
    @Override
    public void run() {
        log.info("农情设备数据获取任务开始:"+ DateUtil.now());
        IFacDevicesDataService dataService= SpringUtil.getBean(IFacDevicesDataService.class);
        dataService.syncLastData();
        log.info("农情设备数据获取任务结束:"+ DateUtil.now());
    }
}

